export default {
    handleClick() {
        console.log('handle');
        const el = this.$refs.drawImage;
        var ctx = el.getContext('2d');
        var img = new Image();
        img.src = '/common/images/demo.jpg';

        img.onload = function() {
            console.log('Image load success');
            ctx.drawImage(img,0,0,300,200)
        };
        img.onerror = function() {
            console.log('Image load fail');
        };
    },
}